<?php

namespace frontend\modules\user\models\traits;

use common\models\orange\OrangeShopCategories;

trait Categories {

    public function getCategories() {
        $model = OrangeShopCategories::find()
        ->where(['parent_id' => 0])
        ->select(['id', 'name', 'icon', 'image'])
        ->orderBy('listorder desc')
        ->all();

        return $model;
    }

}
